<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>OpenShoe: pm_uc3c.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenShoe
   &#160;<span id="projectnumber">0.1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">pm_uc3c.h</div>  </div>
</div>
<div class="contents">
<a href="pm__uc3c_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*This file has been prepared for Doxygen automatic documentation generation.*/</span>
<a name="l00016"></a>00016 <span class="comment">/* Copyright (c) 2009 Atmel Corporation. All rights reserved.</span>
<a name="l00017"></a>00017 <span class="comment"> *</span>
<a name="l00018"></a>00018 <span class="comment"> * Redistribution and use in source and binary forms, with or without</span>
<a name="l00019"></a>00019 <span class="comment"> * modification, are permitted provided that the following conditions are met:</span>
<a name="l00020"></a>00020 <span class="comment"> *</span>
<a name="l00021"></a>00021 <span class="comment"> * 1. Redistributions of source code must retain the above copyright notice, this</span>
<a name="l00022"></a>00022 <span class="comment"> * list of conditions and the following disclaimer.</span>
<a name="l00023"></a>00023 <span class="comment"> *</span>
<a name="l00024"></a>00024 <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span>
<a name="l00025"></a>00025 <span class="comment"> * this list of conditions and the following disclaimer in the documentation</span>
<a name="l00026"></a>00026 <span class="comment"> * and/or other materials provided with the distribution.</span>
<a name="l00027"></a>00027 <span class="comment"> *</span>
<a name="l00028"></a>00028 <span class="comment"> * 3. The name of Atmel may not be used to endorse or promote products derived</span>
<a name="l00029"></a>00029 <span class="comment"> * from this software without specific prior written permission.</span>
<a name="l00030"></a>00030 <span class="comment"> *</span>
<a name="l00031"></a>00031 <span class="comment"> * 4. This software may only be redistributed and used in connection with an Atmel</span>
<a name="l00032"></a>00032 <span class="comment"> * AVR product.</span>
<a name="l00033"></a>00033 <span class="comment"> *</span>
<a name="l00034"></a>00034 <span class="comment"> * THIS SOFTWARE IS PROVIDED BY ATMEL &quot;AS IS&quot; AND ANY EXPRESS OR IMPLIED</span>
<a name="l00035"></a>00035 <span class="comment"> * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF</span>
<a name="l00036"></a>00036 <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE</span>
<a name="l00037"></a>00037 <span class="comment"> * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR</span>
<a name="l00038"></a>00038 <span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span>
<a name="l00039"></a>00039 <span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span>
<a name="l00040"></a>00040 <span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND</span>
<a name="l00041"></a>00041 <span class="comment"> * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span>
<a name="l00042"></a>00042 <span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span>
<a name="l00043"></a>00043 <span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE</span>
<a name="l00044"></a>00044 <span class="comment"> *</span>
<a name="l00045"></a>00045 <span class="comment"> */</span>
<a name="l00046"></a>00046 <span class="preprocessor">#ifndef _PM_UC3C_H_</span>
<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">#define _PM_UC3C_H_</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a><a class="code" href="pm__uc3c_8h.html#aa1626f662e07d1aa23645de70383a8be">00049</a> <span class="preprocessor">#define _PM_UC3C_H_</span>
<a name="l00050"></a>00050 <span class="preprocessor"></span>
<a name="l00051"></a>00051 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {
<a name="l00053"></a>00053 <span class="preprocessor">#endif</span>
<a name="l00054"></a>00054 <span class="preprocessor"></span>
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;avr32/io.h&gt;</span>
<a name="l00056"></a>00056 <span class="preprocessor">#include &quot;<a class="code" href="compiler_8h.html" title="Compiler file for AVR32.">compiler.h</a>&quot;</span>
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="comment">//  These defines are missing from or wrong in the toolchain header file ip_xxx.h or part.h</span>
<a name="l00059"></a>00059 <span class="preprocessor">#ifdef AVR32_PM_410_H_INCLUDED</span>
<a name="l00060"></a>00060 <span class="preprocessor"></span><span class="comment">// Optionnal #undef AVR32_PM_UNLOCK_KEY_VALUE if the define values is wrong.</span>
<a name="l00061"></a>00061 <span class="preprocessor">#define AVR32_PM_UNLOCK_KEY_VALUE       0x000000AA</span>
<a name="l00062"></a>00062 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00065"></a>00065 
<a name="l00067"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310">00067</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00068"></a>00068 {
<a name="l00069"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a885e82bb9f21b5bf240661947d42072e">00069</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a885e82bb9f21b5bf240661947d42072e">PM_CLK_SRC_SLOW</a> = AVR32_PM_MCSEL_SLOW,
<a name="l00070"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a49f43b46cf68d1dc4640584cd8ea9544">00070</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a49f43b46cf68d1dc4640584cd8ea9544">PM_CLK_SRC_OSC0</a> = AVR32_PM_MCSEL_OSC0,
<a name="l00071"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ae6d449f47385521546867f9dc9dbe154">00071</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ae6d449f47385521546867f9dc9dbe154">PM_CLK_SRC_OSC1</a> = AVR32_PM_MCSEL_OSC1,  
<a name="l00072"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a53a1f3a48c75772aa26f29cfb332bbdb">00072</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a53a1f3a48c75772aa26f29cfb332bbdb">PM_CLK_SRC_PLL0</a> = AVR32_PM_MCSEL_PLL0,
<a name="l00073"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a1e251e0f3de3c6858219f063c70b92ba">00073</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a1e251e0f3de3c6858219f063c70b92ba">PM_CLK_SRC_PLL1</a> = AVR32_PM_MCSEL_PLL1,  
<a name="l00074"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a22d4905250f67bb1306bd9049eb61e3c">00074</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a22d4905250f67bb1306bd9049eb61e3c">PM_CLK_SRC_RC8M</a> = AVR32_PM_MCSEL_RCOSC8,  
<a name="l00075"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a7590022a64df93ebd0bde5cc38cde8a5">00075</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a7590022a64df93ebd0bde5cc38cde8a5">PM_CLK_SRC_RCRIPOSC</a> = AVR32_PM_MCSEL_CRIPOSC,  
<a name="l00076"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ad0ad6e68968757591d619c6024cd4e73">00076</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310ad0ad6e68968757591d619c6024cd4e73">PM_CLK_SRC_RC120M</a> = AVR32_PM_MCSEL_RC120M,  
<a name="l00077"></a><a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a51c2eff117a35b4d9013b77740f552ad">00077</a>   <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310a51c2eff117a35b4d9013b77740f552ad">PM_CLK_SRC_INVALID</a>
<a name="l00078"></a>00078 } <a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310" title="Device-specific data.">pm_clk_src_t</a>;
<a name="l00079"></a>00079 
<a name="l00081"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c">00081</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00082"></a>00082 {
<a name="l00083"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca8f30cb60acdab990ecbe9dadd74f3d67">00083</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca8f30cb60acdab990ecbe9dadd74f3d67">PM_CLK_DOMAIN_0</a> = AVR32_PM_CLK_GRP_CPU,
<a name="l00084"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535caa36a86f57a2a32507ce7a84537751ef3">00084</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535caa36a86f57a2a32507ce7a84537751ef3">PM_CLK_DOMAIN_1</a> = AVR32_PM_CLK_GRP_HSB,
<a name="l00085"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca75bf7740192d422d49cc143026403d0e">00085</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca75bf7740192d422d49cc143026403d0e">PM_CLK_DOMAIN_2</a> = AVR32_PM_CLK_GRP_PBA,
<a name="l00086"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca159fdb5cbf3d14bfee214a9b6e10c91c">00086</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca159fdb5cbf3d14bfee214a9b6e10c91c">PM_CLK_DOMAIN_3</a> = AVR32_PM_CLK_GRP_PBB,
<a name="l00087"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca208df795621e2e61888aff5fe95bf70c">00087</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca208df795621e2e61888aff5fe95bf70c">PM_CLK_DOMAIN_4</a> = AVR32_PM_CLK_GRP_PBC,  
<a name="l00088"></a><a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca751484b79b7f306e82e4d1a631cb9b59">00088</a>   <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535ca751484b79b7f306e82e4d1a631cb9b59">PM_CLK_DOMAIN_INVALID</a>
<a name="l00089"></a>00089 } <a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c" title="The clock domains of the power manager.">pm_clk_domain_t</a>;
<a name="l00090"></a>00090 
<a name="l00091"></a>00091 
<a name="l00093"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c">00093</a> <span class="keyword">typedef</span> <span class="keyword">enum</span>
<a name="l00094"></a>00094 {
<a name="l00095"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca30c7faba7d6d0532ac28e39bf02ff061">00095</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca30c7faba7d6d0532ac28e39bf02ff061">PM_CKSEL_DIVRATIO_2</a> = 0,  <span class="comment">// Divide the main clock by 2^1</span>
<a name="l00096"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca7f998cb06cadeca4c20a62174309750e">00096</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca7f998cb06cadeca4c20a62174309750e">PM_CKSEL_DIVRATIO_4</a>,      <span class="comment">// Divide the main clock by 2^2</span>
<a name="l00097"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cae395ebfc33ac30b46edfec9d43d11229">00097</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cae395ebfc33ac30b46edfec9d43d11229">PM_CKSEL_DIVRATIO_8</a>,      <span class="comment">// Divide the main clock by 2^3</span>
<a name="l00098"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cacbb398f7cc39e5aa7754699a9687643d">00098</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979cacbb398f7cc39e5aa7754699a9687643d">PM_CKSEL_DIVRATIO_16</a>,     <span class="comment">// Divide the main clock by 2^4</span>
<a name="l00099"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea40191275793e135fb3b3c792b77ab3">00099</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea40191275793e135fb3b3c792b77ab3">PM_CKSEL_DIVRATIO_32</a>,     <span class="comment">// Divide the main clock by 2^5</span>
<a name="l00100"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca90109336eb88c021bc7846f258cb2c53">00100</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca90109336eb88c021bc7846f258cb2c53">PM_CKSEL_DIVRATIO_64</a>,     <span class="comment">// Divide the main clock by 2^6</span>
<a name="l00101"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea080e0910a2096b31df599973e49fc8">00101</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979caea080e0910a2096b31df599973e49fc8">PM_CKSEL_DIVRATIO_128</a>,    <span class="comment">// Divide the main clock by 2^7</span>
<a name="l00102"></a><a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca962015a41d3c318f04eb07f041cb4153">00102</a>   <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979ca962015a41d3c318f04eb07f041cb4153">PM_CKSEL_DIVRATIO_256</a>     <span class="comment">// Divide the main clock by 2^8</span>
<a name="l00103"></a>00103 } <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c" title="The possible synchronous clock division ratio.">pm_divratio_t</a>;
<a name="l00104"></a>00104 
<a name="l00106"></a><a class="code" href="pm__uc3c_8h.html#ad011b4312da9dd961e90e9884e621f74">00106</a> <span class="preprocessor">#define PM_POLL_TIMEOUT 100000</span>
<a name="l00107"></a>00107 <span class="preprocessor"></span>
<a name="l00109"></a><a class="code" href="pm__uc3c_8h.html#aaa19f9329d0a760de066a859915daa11">00109</a> <span class="preprocessor">#define PM_NOT_SUPPORTED (-10000)</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span>
<a name="l00111"></a>00111 
<a name="l00113"></a><a class="code" href="pm__uc3c_8h.html#a83e474a409f4821a1ffb7a538882ce5f">00113</a> <span class="preprocessor">#define PM_UNLOCK(reg)  (AVR32_PM.unlock = (unsigned long)(AVR32_PM_UNLOCK_KEY_VALUE &lt;&lt; AVR32_PM_UNLOCK_KEY_OFFSET)|(reg))</span>
<a name="l00114"></a>00114 <span class="preprocessor"></span>
<a name="l00115"></a>00115 
<a name="l00118"></a>00118 
<a name="l00119"></a>00119 
<a name="l00131"></a>00131 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#ae8ae9d9b5af1bbd592f7dce6e11677b0" title="Set the main clock.">pm_set_mclk_source</a>(<a class="code" href="pm__uc3c_8h.html#a6d0083840f5a3cef12557a5b93b7d310" title="Device-specific data.">pm_clk_src_t</a> src);
<a name="l00132"></a>00132 
<a name="l00147"></a>00147 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#aceb9e54e518efca8516f4af990489cc5" title="Configure the main clock safety mechanisms.">pm_config_mainclk_safety</a>(<span class="keywordtype">bool</span> cfd,  <span class="keywordtype">bool</span> <span class="keyword">final</span>);
<a name="l00148"></a>00148 
<a name="l00161"></a>00161 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#ad473d037e202983e552d891dac92ade1" title="Set the division ratio for a clock domain.">pm_set_clk_domain_div</a>(<a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c" title="The clock domains of the power manager.">pm_clk_domain_t</a> clock_domain, <a class="code" href="pm__uc3c_8h.html#a2dec77bcf0a6e6ddb97e22052dc1979c" title="The possible synchronous clock division ratio.">pm_divratio_t</a> divratio);
<a name="l00162"></a>00162 
<a name="l00174"></a>00174 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#ac77be1957392fe87dad5adff282c5255" title="Disable the division ratio for a clock domain.">pm_disable_clk_domain_div</a>(<a class="code" href="pm__uc3c_8h.html#aea4a6cecabd6ace50e11b1588576535c" title="The clock domains of the power manager.">pm_clk_domain_t</a> clock_domain);
<a name="l00175"></a>00175 
<a name="l00185"></a>00185 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#ab99d1b12a729c6e6f765e951089be571" title="Wait actively for the clock settings to be effective.">pm_wait_for_clk_ready</a>(<span class="keywordtype">void</span>);
<a name="l00186"></a>00186 
<a name="l00188"></a>00188 
<a name="l00189"></a>00189 
<a name="l00192"></a>00192 
<a name="l00193"></a>00193 
<a name="l00204"></a>00204 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#a07ec689d5d7bbb41b9bacd7589209f8d" title="Enable the clock of a module.">pm_enable_module</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> module);
<a name="l00205"></a>00205 
<a name="l00216"></a>00216 <span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="pm__uc3c_8c.html#a03d78b08e8181f62ae8fbc8095bc54b8" title="Disable the clock of a module.">pm_disable_module</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> module);
<a name="l00217"></a>00217 
<a name="l00218"></a>00218 
<a name="l00220"></a>00220 
<a name="l00223"></a>00223 
<a name="l00224"></a>00224 
<a name="l00232"></a><a class="code" href="pm__uc3c_8h.html#ac11cc59a43dd9ec6b7fb43580453eff7">00232</a> <span class="preprocessor">#define SLEEP(sleep_mode)  {__asm__ __volatile__ (&quot;sleep &quot;STRINGZ(sleep_mode));}</span>
<a name="l00233"></a>00233 <span class="preprocessor"></span>
<a name="l00239"></a>00239 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00240"></a>00240 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00241"></a>00241 <span class="preprocessor">#endif</span>
<a name="l00242"></a>00242 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pm_get_wake_cause(<span class="keywordtype">void</span>)
<a name="l00243"></a>00243 {
<a name="l00244"></a>00244   <span class="keywordflow">return</span> AVR32_PM.wcause;
<a name="l00245"></a>00245 }
<a name="l00246"></a>00246 
<a name="l00253"></a>00253 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00254"></a>00254 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00255"></a>00255 <span class="preprocessor">#endif</span>
<a name="l00256"></a>00256 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pm_asyn_wake_up_enable(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> awen_mask)
<a name="l00257"></a>00257 {
<a name="l00258"></a>00258   AVR32_PM.awen |= awen_mask;
<a name="l00259"></a>00259 }
<a name="l00260"></a>00260 
<a name="l00267"></a>00267 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00268"></a>00268 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00269"></a>00269 <span class="preprocessor">#endif</span>
<a name="l00270"></a>00270 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pm_asyn_wake_up_disable(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> awen_mask)
<a name="l00271"></a>00271 {
<a name="l00272"></a>00272   AVR32_PM.awen &amp;= ~awen_mask;
<a name="l00273"></a>00273 }
<a name="l00274"></a>00274 
<a name="l00276"></a>00276 
<a name="l00277"></a>00277 
<a name="l00278"></a>00278 
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 
<a name="l00288"></a>00288 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00289"></a>00289 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00290"></a>00290 <span class="preprocessor">#endif</span>
<a name="l00291"></a>00291 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pm_get_reset_cause(<span class="keywordtype">void</span>)
<a name="l00292"></a>00292 {
<a name="l00293"></a>00293   <span class="keywordflow">return</span> AVR32_PM.rcause;
<a name="l00294"></a>00294 }
<a name="l00295"></a>00295 
<a name="l00297"></a>00297 
<a name="l00298"></a>00298 
<a name="l00299"></a>00299 
<a name="l00302"></a>00302 
<a name="l00303"></a>00303 
<a name="l00309"></a>00309 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00310"></a>00310 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00311"></a>00311 <span class="preprocessor">#endif</span>
<a name="l00312"></a>00312 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pm_enable_interrupts(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00313"></a>00313 {
<a name="l00314"></a>00314   AVR32_PM.ier |= mask;
<a name="l00315"></a>00315 }
<a name="l00316"></a>00316 
<a name="l00322"></a>00322 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00323"></a>00323 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00324"></a>00324 <span class="preprocessor">#endif</span>
<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pm_disable_interrupts(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00326"></a>00326 {
<a name="l00327"></a>00327   AVR32_PM.idr |= mask;
<a name="l00328"></a>00328 }
<a name="l00329"></a>00329 
<a name="l00334"></a>00334 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00335"></a>00335 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00336"></a>00336 <span class="preprocessor">#endif</span>
<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pm_get_enabled_interrupts(<span class="keywordtype">void</span>)
<a name="l00338"></a>00338 {
<a name="l00339"></a>00339   <span class="keywordflow">return</span>(AVR32_PM.imr);
<a name="l00340"></a>00340 }
<a name="l00341"></a>00341 
<a name="l00346"></a>00346 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00347"></a>00347 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00348"></a>00348 <span class="preprocessor">#endif</span>
<a name="l00349"></a>00349 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pm_get_interrupts_status(<span class="keywordtype">void</span>)
<a name="l00350"></a>00350 {
<a name="l00351"></a>00351   <span class="keywordflow">return</span>(AVR32_PM.isr);
<a name="l00352"></a>00352 }
<a name="l00353"></a>00353 
<a name="l00358"></a>00358 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00359"></a>00359 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00360"></a>00360 <span class="preprocessor">#endif</span>
<a name="l00361"></a>00361 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> pm_clear_interrupt_status(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask)
<a name="l00362"></a>00362 {
<a name="l00363"></a>00363   AVR32_PM.icr |= mask;
<a name="l00364"></a>00364 }
<a name="l00365"></a>00365 
<a name="l00367"></a>00367 
<a name="l00368"></a>00368 
<a name="l00369"></a>00369 
<a name="l00372"></a>00372 
<a name="l00373"></a>00373 
<a name="l00378"></a>00378 <span class="preprocessor">#if defined (__GNUC__)</span>
<a name="l00379"></a>00379 <span class="preprocessor"></span>__attribute__((__always_inline__))
<a name="l00380"></a>00380 <span class="preprocessor">#endif</span>
<a name="l00381"></a>00381 <span class="preprocessor"></span><span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> pm_get_status(<span class="keywordtype">void</span>)
<a name="l00382"></a>00382 {
<a name="l00383"></a>00383   <span class="keywordflow">return</span> AVR32_PM.sr;
<a name="l00384"></a>00384 }
<a name="l00385"></a>00385 
<a name="l00387"></a>00387 
<a name="l00388"></a>00388 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00389"></a>00389 <span class="preprocessor"></span>}
<a name="l00390"></a>00390 <span class="preprocessor">#endif</span>
<a name="l00391"></a>00391 <span class="preprocessor"></span>
<a name="l00392"></a>00392 <span class="preprocessor">#endif  // _PM_UC3C_H_</span>
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2011 21:04:51 for OpenShoe by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
